/**
 * 汉诺塔
 */
package com.study.s07.recursion;

public class HanoiTower {

	/**
	 * 移动盘子
	 */
	public static void moveTower(int n, char from, char inter, char to) {
		
		if(n == 1) {
			System.out.println("盘子1，从" + from + "塔座，移动到" + to + "塔座。");
		} else {
			moveTower(n - 1, from, to, inter);
			System.out.println("盘子" + n + "，从" + from + "塔座，移动到" + to + "塔座。");
			moveTower(n - 1, inter, from, to);
		}
	}
}
